match pragma-dudes style guide
fix bug with button down/up event
add require.js
rewriten using require.js