Update core.tools.List

Switched out a while loop for a for loop in consolidate() method, cleaned it up a bit too.