Some improvements, New functions