Complete the implementation of the Cave framework replacement. Create tests in order to find bugs and have maintainable code.