some more refactoring to make code more readable
xcode project changes