Removed all the public variables & added getters and setters for them.