Move some functionality to common class