various modifications
more cleanup