Refactoring, switched to using more generic collections.
Made getMessageFactory abstract.
Added last missing java docs.