Made various minor improvements

Re-indented all code.

Replaced every printf that prints an error message with an fprintf
that prints to stderr.

Removed unnecessary strncpy.

Removed every printf that printed to stdout.
Added a makefile