Changing functions from protected to private