Made logging in the entire application consistent.
Revamped logging through the entire codebase. Added logging to the
debug page.