template updated
removed unused stuff
small fixes
apple script extended