[gmusic]: cleanup duplicated code