reformat codes
add comments
fix cpml bugs
change cpml for computing rho