Avoid printing trailing whitespace to the log
Only test output tlks when it is necessary
Reformat tolower.ml

- Consistent indentation
- Untabify
- Delete trailing whitespace
- Remove some unnecessary stuff