Startd debugging and writing unit tests