Changed the parameter 'secretKey' to 'secret' in all locations for consistency.  Refactored a javscript `for..in` to use `_.each`.