changed class variables to private.
added getters and setters where possible.