Rev integration

Tried to make a clean rev integration.