Refactored the basic app.