Complete js refactoring and begin of playlist support