initial stab at Moo port; some tests work, most do not