Added comments as necessary and fixed minor bugs with README.