Semi-final copy, need to fix up formatting and delete code that is unnecesary.