Remove excess lines