Added support for base64 encoded maps,

This took over 3 days of work, and should probably be split up into more
methods