Eliminate use of temporary lists