Shortened first part
Cleaning
Cleaned short1
Added scatMap and repWith