Fixed some minor bugs and created a Loggable trait (php >=5.4)
PSR-0, PSR-1 and PSR-2 fixes