Update to version 1.4

Rewrite JS + several fixes