Replaces all instances of the 'when' library require statement to avoid usage of the when keyword