Added more comments, used req class to toggle required attribute