Refactored UI manager and split out a build mode manager