Split out the parsing code from the MagicEntry which was getting too
large a class.