Refactor initialization

Refactored app initialization using only qt if necessary. Reduces the startup time for parsing and generation.