Alot of refactoring to make basic app work. Still needs more work