Refactor render. Added view context.