Short code updates by Allan

Here's the pull request as suggested.