Added more about the algorithm in the javadoc. Please check the latest commit.