Refactored code: changed class fields to private

Changed class fields to private so that the only access is through
Get/Set operations.