Update comments and added some code