Added javadocs and registration form validation