Small changes to functions (reordering arguments, etc.)
Added timeCat() function to print meaningful messages.