refactored some common functions to renderUtils.js
added missing semi-colons