Made numerous small changes and comments. Wrote 2/3rds of the assignment-simulation part