remove a bunch of unnecessary spaces