Finished implementation. Addded documentation, filled javadocs.