Work on pulling functions out of ui code areas.