Add some comments & fix code style