clean up the code commenting style and works mostly with some mino bugs.