Refactoring, cleaning up and adding tests for sibling.