Removed logging functions and cleaned up other issues