Small code changes

* Made open braces opening on the same declaration line
* Re-added tput since the $COLUMNS variable was not set in my terminal
and I may not be the only one.
* Re-added an if for better readability