refactor in prep for other data sources

Signed-off-by: Ricky Elrod <ricky@elrod.me>