Refactor winamp.js