Moved code from master to demo branch