rewrite osascript part, export osasciprt and run function, clean up and rename things
Merge branch '1.0'