Stored all business logic in commands.c.

added parse_resp() and coresponding TODO's