Added Logging classes and minor refactors