metafile parsing now works, numerous bugfixes, added javadoc comments