even more work... should really wrap this up into a rebase soon I think.