Added demo files and small refactoring