Jacob Frey- cleaned up code and discarded need for library