Added Category#index_of_parent_option

Beatufied some code