Assignment 3

Refactor functions into static object, plus add sort() function