reorganize Track initialization and event handling