Changed how app is started and added a test