Added tests for index queries, more index settings moved into the Meta class, and better error messages