Re-ordered into once and function files