Extensive comments + TODO list + fixed the connection dropping out.

 — Still need to make the connection attempt to automatically re-establish itself.