fixing problems with contexts being created multiple times, called in multiple places, etc.