Moved UI stuff into a helper function.  Detective Notes still crashing.