Enable to add line number, and minor refactoring.