Refactor codes about village infomation