Basic Query Builder logic is working, although a good cleaning up might be in order.