Changed public vars to private, added getters.