some refactoring and removed the automatic adding of .js for script files