Patch from Scott McKellar (with commentary on future plans):