Big changes here. Separating UI layer and functionality layer.