Implemented smartOptions feature, merge into master