script handler: fix script docs + some cosmetic changes