Logging and a few cleanups
added natty logging