Refactor screen loading and transitions.