Make init_magic() piece agnostic