refactored some types and interface to be more consistent with original extendability idea