Working js example, with tests under jasmine and a simple UI