Clean up and document
diff --git a/desktop-setup.sh b/desktop-setup.sh
deleted file mode 100644
index a338005..0000000
--- a/desktop-setup.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-# desktop-setup.sh
-#  
-# Sets up a desktop environment for the ONOS tutorials.
-
-# Remove kernel boot options that will prevent the gui from running
-sudo sed -i s/text// /etc/default/grub
-sudo sed -i s/ipv6.disable=1// /etc/default/grub
-sudo update-grub
-
-sudo apt-get install -y xorg lxde systemd-shim
-
-#TODO: add backgrounds folder
-sudo mkdir -p /usr/share/backgrounds
-#TODO: change background
-# Remove wallpaper, change background color
-sudo sed -i 's/wallpaper_mode=1/wallpaper_mode=0/g' /usr/share/lxde/pcmanfm/LXDE.conf
-sudo sed -i 's/desktop_bg=#000000/desktop_bg=#104187/g' /usr/share/lxde/pcmanfm/LXDE.conf
-
-sudo sed -i 's/lang=1/lang=0/g' /etc/lxdm/default.conf
-sudo sed -i 's/bottom_pane=1/bottom_pane=0/g' /etc/lxdm/default.conf
-sudo sed -i 's/disable=0/disable=1/g' /etc/lxdm/default.conf
-
-# Allow VM to be rebooted from GUI
-echo "session required pam_systemd.so" | sudo tee --append /etc/pam.d/lxdm
-
-wget -O onos.png "https://gerrit.onosproject.org/gitweb?p=onos-vm.git;a=blob_plain;hb=refs/heads/onos-tutorial;f=onos.png"
-sudo cp onos.png /usr/share/backgrounds/default.png
-
-# Change LXTerminal default colors
-sudo sed -i 's/bgcolor=#000000000000/bgcolor=#ffffffffffff/g' /usr/share/lxterminal/lxterminal.conf
-sudo sed -i 's/fgcolor=#aaaaaaaaaaaa/fgcolor=#000000000000/g' /usr/share/lxterminal/lxterminal.conf
-
-# Disable screensaver
-sudo sed -i '/screensaver/d' /etc/xdg/lxsession/LXDE/autostart
-cat > /home/mininet/.xsessionrc << EOF
-# disable screensaver
-xset s off
-# disable dpms (standby)
-xset -dpms
-EOF
\ No newline at end of file
diff --git a/dist-setup-lxc.sh b/dist-setup-lxc.sh
index 87666ba..2a69ea6 100644
--- a/dist-setup-lxc.sh
+++ b/dist-setup-lxc.sh
@@ -1,4 +1,9 @@
 #!/bin/bash
+# dist-setup-lxc.sh
+# 
+# Runs as distributed user.
+#
+# Sets up the distributed ONOS tutorial.
 
 export USER=distributed
 export USER_HOME=/home/${USER}
diff --git a/onos-build-vm.py b/onos-build-vm.py
index 4987264..38af1a9 100755
--- a/onos-build-vm.py
+++ b/onos-build-vm.py
@@ -30,24 +30,6 @@
     vm.expect( prompt, timeout=20 )
     vm.sendline( 'bash vm-setup-lxc.sh' )
     vm.expect( prompt, timeout=3600 )
-
-    
-    #vm.sendline('sudo su - mininet')
-    #vm.expect(prompt, timeout=20) 
-   
-    #vm.sendline( 'git clone https://gerrit.onosproject.org/onos' )
-    #vm.expect( prompt, timeout=30 )
-    #vm.sendline( 'cd onos && git checkout %s && cd -' % onos_version )
-    #vm.expect( prompt, timeout=1200 )
-  
-     
-    #vm.sendline('ssh 127.0.0.1')
-    #vm.expect('.*connecting (yes/no)?')
-    #vm.sendline('yes')
-    #vm.expect(prompt, timeout=30)
-    #vm.sendline('exit')
-    
-    #vm.expect( prompt, timeout=1200 )
    
     url = 'https://gerrit.onosproject.org/gitweb?p=onos-vm.git;a=blob_plain;hb=refs/heads/new-onos-tutorial;f=onos-setup-lxc.sh'
     vm.sendline( ' wget -O onos-setup-lxc.sh "%s" | bash' % url ) # space prefix is used to avoid entry in history
@@ -55,11 +37,6 @@
     vm.sendline( 'bash onos-setup-lxc.sh' )
     vm.expect(prompt, timeout=3600)
     
-    
-    #vm.sendline('exit')
-    #vm.expect(prompt, timeout=20) 
-    
-    
 
 def vmdk2size( vmdk ):
     "Return virtual disk size (in bytes) of vmdk image"
diff --git a/onos-setup-lxc.sh b/onos-setup-lxc.sh
index 1f8c6e8..3f89538 100644
--- a/onos-setup-lxc.sh
+++ b/onos-setup-lxc.sh
@@ -1,8 +1,10 @@
 #!/bin/bash
 # onos-setup-lxc.sh
-#  
-# This script sets up the VM ready to run ONOS and tutorials, including installing an LXC cluster
-# for ONOS to run in.
+# 
+# Runs as mininet user.
+#
+# This script sets up the desktop environment, installs ONOS in the LXC cluster, 
+# then creates a user for each tutorial and runs the tutorial setup script.
 
 function create_user {
 	local name=$1
diff --git a/opt-setup-lxc.sh b/opt-setup-lxc.sh
index 6d5a3d0..01fd5eb 100644
--- a/opt-setup-lxc.sh
+++ b/opt-setup-lxc.sh
@@ -1,4 +1,9 @@
 #!/bin/bash
+# opt-setup-lxc.sh
+# 
+# Runs as optical user.
+#
+# Sets up the packet-optical tutorial.
 
 export USER=optical
 export USER_HOME=/home/${USER}
@@ -21,7 +26,6 @@
 EOF
 
 
-
 cat > "${DESKTOP}/Mininet Small" << EOF
 [Desktop Entry]
 Encoding=UTF-8
diff --git a/sdnip-setup-lxc.sh b/sdnip-setup-lxc.sh
index 729c1a9..9de2042 100644
--- a/sdnip-setup-lxc.sh
+++ b/sdnip-setup-lxc.sh
@@ -1,4 +1,9 @@
 #!/bin/bash
+# sdnip-setup-lxc.sh
+# 
+# Runs as sdnip user.
+#
+# Sets up the SDN-IP tutorial.
 
 export USER=sdnip
 
diff --git a/tutorial1-setup-lxc.sh b/tutorial1-setup-lxc.sh
index a38b58e..2889da6 100644
--- a/tutorial1-setup-lxc.sh
+++ b/tutorial1-setup-lxc.sh
@@ -1,4 +1,9 @@
 #!/bin/bash
+# tutorial1-setup-lxc.sh
+# 
+# Runs as tutorial1 user.
+#
+# Sets up the basic ONOS tutorial.
 
 export USER=tutorial1
 
diff --git a/vm-setup-lxc.sh b/vm-setup-lxc.sh
index 42c3adf..6e691b7 100644
--- a/vm-setup-lxc.sh
+++ b/vm-setup-lxc.sh
@@ -1,13 +1,13 @@
 #!/bin/bash
 # vm-setup.sh
-#  
+# 
+# Runs as root.
+#
 # This script sets up the VM ready to run ONOS and tutorials, including installing an LXC cluster
 # for ONOS to run in.
 
 sudo apt-get update
 
-# TODO erlang, quagga, wireshark
-#sudo apt-get install -y git openjdk-8-jdk maven unzip curl make gcc wget autoconf openssl libssl0.9.8 libssl-dev libncurses5 libncurses5-dev lxc
 sudo apt-get install -y git openjdk-8-jdk maven unzip curl wget lxc virtualbox-guest-utils wireshark quagga erlang make gcc autoconf openssl libssl0.9.8 libssl-dev libncurses5 libncurses5-dev
 
 sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
@@ -51,10 +51,11 @@
 sudo lxc-attach --name onos1 -- chown sdn:sdn /home/sdn/.ssh/authorized_keys
 sudo lxc-attach --name onos1 -- chmod 600 /home/sdn/.ssh/authorized_keys
 
+sudo lxc-attach --name onos1 -- apt-get clean
 
 sudo lxc-stop --name onos1
 
-
+# Clone the first node to create two more nodes
 sudo lxc-clone onos1 onos2
 sudo sh -c "sed -i s/10.0.3.11/10.0.3.12/ /var/lib/lxc/onos2/rootfs/etc/network/interfaces"