Moved functions to renderQueue.js