Implement context elements to better decouple the code.