Refactoring to minimize query side dependencies on Cassandra