Applied bash style guide from https://google-styleguide.googlecode.com/svn/trunk/shell.xml