fixed warning and refactor to DRY code
Merge branch 'master' of github.com:kalmbach/osmn