Properly incapsulated the classes.