Lots of style refactoring and jquery code