remove cruft and spaces