Removed duplicate code into abstract classes