bunch of fixups, should work out of the box now