Removed softcoded commands because it was making implementation unnecessarily complicated.
Changed the way replies are processed.
JSON support implemented.