added addTrackCode method to DBHelper and refactoring in save code button handler