Improved list function.