Code improvements
Initial work on JS plugin