Added some comments and merged into master branch