Removed log and dead code.