TCP bug solved. Minor parsing issues to look at.