cleaned up code

cleaned up all functions, saved all data into an array which is actually an object. jsut trying to take a natural approach to discovering OOP style programing. will turn said array into a class soon enough