Refactor tests
Better handling of where select queries
Clean up docstrings