Switched from print to logger module.
General cleanup.