added remove trailing spaces function and a few more mappings