Add mp3 library and refactor code