Removed obsolete code, restructured the way files are loaded
Fixed minor error