Refactor js functions
Merge branch 'master' of https://github.com/mariusbalaban/RSL-amazing