Changing some functions to private