-cleanup and minor improvements