Removed debug statements and some minor other things