Setting up the main application