Added controller render and context setup methods, and tests.