Refactored for iterators.
Laid out basic structure of rewritten library.
Implemented thread-safe Connection.