Added UI elements and form validation