Not tested: Add several function and correct some mistakes.