Got query and test commands working (and tested). Also added a new command