replaced all 'do shell script's with functions; fixed ambiguities in variable names & repetitive use of variables; cleaned up whitespace
replaced all 'do shell script's with functions; fixed ambiguities in variable names & repetitive use of variables; cleaned up whitespace

AlexanderGalen/applescripts,AlexanderGalen/applescripts