poke doco and cleanup
move js from module to to module-specific js file