Rewrite EVERYTHING.
Add logging messages.