Status and commissioning of the CMS detector