Functions to add/remove select option are generalized.