Submitted version of milestone 1 with small changes.