refactor into App, Views and Model