Added comments, javadoc and changed some stuffs. My part is done but
cannot be tested until the other parts have been completed.