Merge back

This is a final version. Can be used in prod.