Fix `...` parsing

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>
Cleanup _get_rest_q_string

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>
Cleanup code

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>