Modify pretty printers

- Change the name of type `line_type' to `index' (Arguments of constructors `Head' and `Foot' are removed)
- Change the names of several local variables
- Improve documentation