Removing unnecessary functools reference for 2.6 compatibility. Cleaning up imports and pep8 issues. Now read host/port and ssl key/cert info from config.