Fixed demonstration and added more comments