WIP - cleaned up to make more object oriented - still need to work on sort function