Lots of stuff; tests mostly passing