Updates functionality and tests