Tune refx to prevent tearing and add gitignore