Finishing touches

Everything is finalized, complete with comments. Ready to submit.
.