Removed unused function, tidied printed output. 

* Removed unused function
* Tidied printed output
* Added closes for file handles

*note to self: notepad++ uses tab characters instead of spaces by default.