Added support for proper logging
Cleaned up
Merge pull request #3 from Etromora/master

Added logging