Add tests + fix profiles migrator.