After removing the resvar functions and old plots