Completed assignment

Add write-ups and fix some minor issues.