Moved state functionality to App.java