Refactor lists, some bugfixes
Update to output markdown
Remove some extra debugging, improve generator codeblocks