First (broken) implementation
Adjusted classes.