Add SQLite3 support, closes #580