Implements factory methods for constructing the UI