style and pep8!

also, fixed an error when list() would bork in an error condition.