Added many comments. Possibly finished.