iOS refactor