Validated plugin and made necessary changes per JSHint