Reworked the way we query bricks