opt: Simplify the API