Added basic tcp listener and some cleanup