Feature/clean javascript

See issue #475.