Rewrite some js to cljs, part 2