Reorganized automator scripts to make it modular and scalable.