Useless space removal