Moved unused testing function to a place that is more aesthetically
pleasing. Plan on removing it later on.
Added exit function and filename checking.
Corrected indentation - tabs to spaces.