Added generate random number in plugins js & re-organized, documented it better