Updated repex, still almost working.