Rewrite some js to cljs