Optimized Extensibility

Created more generic variable names so script could be used for a wider
variety of tasks. Also made the "output" directory and optional one.