adding app state, adding enums, cleaning up code more and more