Updated demo. Changed overall implementation.