added more queries
cleaned up terminal client, removed old functions