Rewrite some js to cljs, part 4