v2.3.8 - Code cleanup and update to ThomasHempel's pull request. Add optional appName parameter.