use named constants
add .jshintrc
add write support