add some comment and remove unused js