Final working version after sending it to John. As of 3/28/2014