Consistent code style and jshint rules.
Add popup mode.
Pass through dateFormat option