Moving functions into the object