Updated to make some tests pass