clean up LinearMap implementation
Merge pull request #4623 from thestinger/map

clean up LinearMap implementation