Fix tests
Move helpers into relevant files
Add context tests
Add more context functions