Made variables private and added getters and setters