Removed location dict and switched to using shallow copies.