apply: rename and move opt constants to apply.h