Improved logging and added some more docstrings.
Merge pull request #1 from futureimperfect/logging

Improved logging and added some more docstrings.