Refactored size variable to be private.