client is now able to read queries from command line
further little fixes
some further fixes noticed by -wextra