Moving some common functionality to an abstract class