Handle context properly and update the example to use the code in lib
Don't depend on self