First commit on the list function. Slightly broken currently.