Made variables private and added get and set methods