Encapulate components into classes.