Make chosen function optional
Merge branch 'master' of git://github.com/newicon/nii-core