JSHinting code & Bugfixes