A few small bugfixes. Enumeration works AFAICT.