Added tests for nested and/or queries

These already worked, just needed to add tests for them.