Moved functions out of code and into util class
Finished challenge 6