More bugfixes... need to figure out issue with where relative file paths start from. May need some reworking to fix.