Code cleanup + JSHint