Reworked inheritance to improve testability