Adding internal logging facilities. Slowly moving through code base and injecting debugging print statements where applicable.