Started adding other functionalities back in, lots of refactoring to be done