added undo feature
added index to non-active songs
moved undo initialization to its own function