Some code prettify has been done.