this commit refs #212, fixed circular dependencies by using inheritance