Reintroduce switch control structure
Hoist directory traversal responsibility out of generate
Move Entries utility code to entries.go