Merging jsclient and js