Fixes #31; implements basic query and colection stats