Updated demo and source code