Remove unused functions from context.[ch]