Fixed moar fail

the cleanup routines were not working as expected
fixed up and added some specs