changed fluxion syntax, and lighten javascript implementation