changed all attribute name to follow conventaion, small cleanup and added validation for fields