Bug fixes + improved tests
TestResource improvements

All TestResource tests pass.