Added SQLite functionality for activity