Add more unit tests, make them pass