Added proper testing for CLS, and finalised implementation