Script options, presets, refactorizations

Added script options, presets, and fixed several small things.