Changed application flow to make more sense.