Added comments with examples.
Reorganize codes.
Clean up.