Remove tailing and heading data