Streamlining code

Yes I want to expand, collapse and scroll when a dropdown is selected. The scroll seems to work but doesn’t expand. I tried collapsing most of the code to functions but not sure if velo is going to accept it.