friend class introduced and clean up of class modules