refactor: extract globals on app