Cleaned up form validation