Merged in final stuff from Indar.