Move queries to repository classes

Closes #28

Signed-off-by: Max Fierke <max@maxfierke.com>