Making the project build and run with Xcode 4.
Added comments.