improved duck typing and renaming files to have proper .js extensions