Fix some issues around DB
Implements 'Add terms which notify' command
Change DB schema