Improve APNS code sytle