Code refactoring and bug fix on whether play playlist or track

also updates readme example