Replaced hard-coded numbers with class fields.