Defined missing used variables of the class and removed unused local vars