Added a couple extensions methods
Code improvements for logging
Code clean up