Added Code comments and made id optional