Sweep some style

Add more comments with better XML convention.
Add necessary explanation.