Renamed 'class' to 'cls' where required