Added SQLite DB, base for Flags, minor style changes, TODOs