Refactor slightly app loading.