add generate playlist button on mainView, add some code improvements