Change class fields to provate to facilitate testing