Capture SQLException instead of PSQLException.
Removed unnecessary dependencies from core.