Misc. bug fixes and print statements for clarity