Commented some unwanted bits out.  Temporarally converted to a script for debugging purposes
fixed a small bug