Some correction of code design for better reading