Fixed purge. Is now not stupidly over-complicated