Remove depreciated syntax for function declaration

As per http://wiki.bash-hackers.org/scripting/obsolete

The syntax "function" has been depreciated.  Discovered/fixed with the help of tomased from #adagios on freenode.