Added sparse comments. Going to have to reprogram this with some thought at some point.