Reduce code redundancy between classes