Refactored download player script to be a node module