Changed addOptions to accept options as object