Reimplemented remote_connection.py using httplib module to provide keep-alive functionality