Some cleanup and minor ui fixes