Finished four lock algorithms.