last commit before turn in. many major bugs fixed.