Cosmetic changes to js and some code removals

Removed a flexslider reference which was something i missed when
removing the flexslider directory from the theme folder as we already
have flexslider in sites/all/libraries. Made some Cosmetic changes to js
code in the process.