Removed code duplication.
Merge branch 'master' into iOSDevUK