Comment and beautify code