Added a bunch of whitespace and logging updates.