Adding ability to use custom context class for rendering