Cleaning up a big mess (i hope)