clean the code and adopt iOS7.0