Inital code and unit tests