Bug-22: Add Word and WordStorage class

@john-hu Please help me review this patch. Thank you.
Should I check if "input" and "output" is not null, then close it ?