Cleaned up some of the list and list detail code.