Added further structure to app.