use the exemplary mapstructure package to simplify things quite a bit... and avoid a whole lot of nasty NIH...