remove trailing whitespace and remove unused Ack command