Rearchitect with tests