Clean up code. Strip extranious newlines. Add new recv method.