tidy up phile::normal - move rms out to a seperate file, support iterators