WIP
Refactor filters to run on the DB where possible.
Extract data module.
Add function key in build phase.
Merge branch 'refactor/query'
Cleanups.
Add test and lint task to makefile.