Duplicate two simple functions between playlist and library pane and declare statics.