Removing useless variables