finnished
fixed up some of the names and added comments