Stokes refactor

cc @ChrisBeaumont @keflavich