split magic files

(sorry, previous PR wasn't able to merge)
this PR splits magic into multiple files
Your going to hate me but this can come out too