SDK updated to version supporting iOS7
Refactor to simplify