Added validation and cleaned up views.