Minimize() mostly done, but dereferencing problems with map