Logging

This PR adds some proper logging and packaging improvements.