Removed all print statements and some unneeded code