Code clean up and implemented Monolog