Changed the way files are loaded. Needs improvement.