minor cleanup and fixes