Refactored documents. Introduced IndexDocument and made Document into a
concrete class instead of interface.
Created abstract document class for generic document stuff.