Removed unncessary functions, fixed TCP connection to xively