Rewrite to open file directly without overlay

Also added a revert option