update demo and minor cleanup