multi-file project fixes
lots of bugfixes