Extract Menu/Button code