Add context method and change object to use context.