Fix comments.
Move options validation to functions.
Validate options in separate function.
Add JSHint linting.