Removing use of deprecated function $render