Added raw uncommented code that needs to be cleaned up shortly.