Logging Update!

Moved the log code to a separate module.
Updated what is logged and when.