Changed instance variable map to pointer and made it only work with var type.