Move common methods to helper file