Total restructuring of files
Fixed problems introduced by restructuring