Code cleanup. Removed unused variables