Format and fixes

Everything now matches the examples format in the homework and I added a
line at the end to make the program exit solidly rather than by error.
So yeah!