Add clarkson Algo 4 and refactor Algo 1.