change various state-changing functions into methods on the App() object