a little reorg for 0.4; experimenting with compiling to js