refactoring app delegate and application flow for Prase integration