Clean up code

Clean up the issues from CodeClimate and JSHint