optimize: used the appropriate printing function in related test cases
removed the unnecessary local declarations
removed semicolons
renamed function build() to reply()
minor edits in replying test cases
minor tweaks in the reported error info
altered the value returned from function parse()
reflected the changed API used in the test caeses
doc: updated the sample code