Make saveContext a class method rather than an instance method