On some classes of modules and their endomorphism ring