Refactored some stuff and added a new MetaInfoFile class with tests.