Refactor render into more shorter methods.