Edited print statements, removed msg2print, cleaned up code