+function upperme {
+    echo $(basename $0) | tr '[:lower:]' '[:upper:]'
+}
+
+function scottyinfo {
+    echo $(upperme): $@ 
+}
+
+function scottyerror {
+    echo $(upperme): $@ >&2 
+}
+
+if [ $(pidof -x $(basename $0) | wc -w) -gt 2 ]; then 
+    scottyerror Another instance of $(basename $0) is already running!
+    exit 1
+fi
+
+while getopts "qn:" opt; do