fixed hang on bash console
Refactoring of response types on client. Added proper json formats for results