Simplified logging code. Made logs easier to read.