Fixed the implementation of some classes.