refactoring started
tests for some Resource class methods added
more tests