Review, add coments and fix bugs.