automated table just about working, with fields now just called 'fields': I'll have to use comments to remember what names are, but this is way better than having a new template for EVERY possible table