Refactor to make the code more standardized.
Just for study.