Rearrange mutation code, need to test this still.
made mutation working now in bacbuild with use case.