Move more code back into place