Added check for javascript files
Lots of code updates, added more rules