Move get_magic to magic_magic, minor cleanup.
Pep8 fixes.