Implemented dirty object and improved tests.