Code cleanup, removed unused variables