make option selection more robust, add support for coffeescript