Changed to use putAll where possible.