removed antipattern and put js tags to the bottom of index file