Introduce module requires, CommonJS style
Make tests work with requires
Make jshint happy
Fix example/characterisation test