Removed logging and deleted some unused cruft