Eliminating some useless variables