Updates demo project and refactored code