make fields protected to prevent programmer error, fix some math issues in getUnlocalizedName