Adding val() to the Element class