Some changes

Some changes to debug
Documentation

Documentation
Demo

Added demo R scripts to demo folder