lots of cleanup and now uses mahtout 0.9 snapshot, still much untested