little cleanup and fixes for latest commit