Use local variables better