Use maps instead of anonymous structs. Fixes #19