Added logging. Added inheritance.