Reorganizes all rei files