Cleaned up the code a bit. Removed some log entries.