contain library elements in module
use requestAnimationFrame for main loop
change default draw mode to "corner"