Code cleaning

Adding a lot of comments