Added Export Script functionality and fixed some parser errors.