Fixed a few errors, formatting cleanup