Fix up some bugs and clean up all print statements