Transient/refactoring

A number of small commits that refactor some classes to use composition instead inheritance.