Majorly improve cleanup script