If you want to write the perfect thesis, you have to do your research first. Of course you'll want to research your subject thoroughly, but you'll also want to do a little research on what makes a good thesis.
You'll also need to know how those recommendations apply to your school, because each and every school is different. They all have different ways that they want you to go about doing your thesis, and they all have different ideas about how it should be formatted, how many pages it should be, and other issues.
Before you get too involved in writing your thesis, make sure that you know what your school's policy is on them and that you understand whatever instructions you have been given – either orally or in writing – so that you don't cost yourself a lot of extra time and aggravation in trying to put together a thesis that you think your school will like.
When you know what is required of you, the thesis creation process can be completed much faster and much easier.