Gave stuff in the render function their own functions