finished object and relation handling, and wrote tests for it