Merge selected/all now in same script

Also fixed error on removing spaces.