Added methods to run queries to Buffer updates + some slight refactoring