1. Fixed up debug statements and unit tests