pull request cleanup and small fixes