cleanup and minor changes