Fixed database error by switching to jdbi, also working on views