Refactor Tag to Dictionary
Update database file