removed unused variables and fixed defect in first screen