SharePoint: Issues with creating list definitions using Visual Studio wizard.

The List Definition creation becomes very easy by using the Visual Studio wizard. However, today I faced an interesting issue with lists of type Calendar, Document Library and Announcements present in our project. 
For example, the "Add" link was not appearing when hovering over the calendar in the calendar view.
Add link not present
Also the ribbon was showing Items tab instead of Event tab.

Events tab not present.
Similarly, in the announcements list, it was showing new item instead of new announcement:
new announcement not present
And in document library it showed new item instead of new file.
new file not present
If we open the Elements.xml file of the list definition and list instance we find that random numbers usually starting from 10000 are applied to Type attribute in ListTemplate and TemplateType of ListInstance.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="">
    <!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List project item, an error will occur when the project is run. -->
        Description="My List Definition"
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="">
  <ListInstance Title="Calendar List" 
                Description="My List Instance"></ListInstance>
All these issues can be resolved by using the actual Server Template IDs of these out of the box lists. For example, the Server Template ID of Calendar List (Events list) is 106. For document library it is 101 and for announcements list it is 104. So, for the calendar list the Type attribute in ListTemplate should be equal to 106 and TemplateType attribute in ListInstance should also be 106.
Here is the list of all server template IDs.