code clean up in derivativemaps.fs