More code prettification, mostly to make it clear how the polymorphic recursion is working.