Al-jawab billahi at-taufeeq (the answer with Allah's guidance)
If you have not intended Kufr due to error and the thoughts that you have of Kufr does not reach to determination (Azm), then you are still a Muslim.
Prophet (Sallallahu Alaihi Wasallam) said,"Indeed Allah forgives all that they thought in their hearts as long as they do not utter it or act upon it." (Muslim)
To remove such thoughts (Wasawis); keep your tongue busy in the Zikr of Allah.
Abudullah Bin Bisr (RadhiyAllahu Anhu) narrated that one person asked, “Ya Rasool Allah! There are many commands on me of Islam. Tell me of such a thing which I may hold on to steadfast. Rasool Allah (Sallallahu Alaihi Wasallam) replied, “Always keep your tongue moist (busy) in the Zikr of Allah.” (Tirmidhi)
Keep active in doing something good; such as, acquire Ilm (knowledge) about one's Deen.
Stay in the Suhbat (company) and Majalis (gatherings) of the pious people.
More ways to remove such thoughts, please refer here: http://www.muftisays.com/qa/question/4144/kufr-or-not.htmlhttp://www.muftisays.com/qa/question/1779/guidance.html
And Only Allah Ta'ala Knows Best.