Changes to mapping functions and pipeline