Fixed issue #14 (performacne) and #63 (stale JDBC connections).