payload build optimization when sending ios notifications, fixed compilation warning
minor style improvements