Cleaned up UI validation and patterns.