- Added additional logging/tests and minor refactorings