Improve JavaScript coding style

To comitted code now passes the Airbnb pattern using jscs