Refactoring. Trying to get less.render working with promises.