Extending render() function to allow for the content to be returned instead of appended