Remove 'gen_' prefix from most functions in SQL
Auto-select entity by normalizing expression

Closes #5.