Moved the extend utility fn to lib/utils.js