Remove orphaned metadata table and cleanup database scripts
Add SQLite database support