Move startup logic into Application class