Kim Jong-il , the ailing leader of the reclusive communist country , has been flexing his muscles with nuclear tests and missile launches , partly to assert himself internally amidst reports of possible preparations for a succession , but also to improve his negotiating position in any upcoming talks .