Updated to pull needed attributes from context.