[#23] fixed npe in query construction, renamed LRG classes