New functions and typo fixes