Ported some more work