Merge pull request #70 from mbacovsky/resource_singleton

Connection singleton + foreman stuff cleanup
Ref #3897 - dynamic bindings