Updated with few sections and code format.