Cleaned up connections read / write implementation