Rewrite cljs functions to js. Part 2