Cleanup and bugfixing -- file paths etc.