Made the code a scala script
updated doc