Use <bar> for mappings with '|', fix bugs
Simplify script