Adds UI instance variables and UI elements.