refactor func key dao, move all database logic to the same place
refactor func keys queries, make cleaner abstractions
refactor database converter