Cleaned up formatting.
Implemented Exit.

Soft error occurs in running of array (return status -1), likely due to
improper memory allocation.