Improved function map
Fixed binary by-scalar mutiplication