feat: minor refactor, add test cases for object functions, add documentation