Fixed some code form, improved code consistency.