Revise the code

Add comment and auto format