Closes #6 General code tidy