Adjust debug output to changed api
Improve error handling: first test for whether we're a list, then access its members so we can throw our error message instead of a generic error occuring.
use 'list' in plural names
Use 'list' in plural variables