Finished the implementation. All that's left is to write tests