ENH: Added code for the main classes.