[Update] Clean code, add some comments