Factor out plots because of getcwd problems.