Remove unneeded variables, use getters.