Clean up warnings and errors.

Format consistently.
Move NHC length warning to avoid using an uninitialized value.
Add some missing exit calls with errors.

Close #51.