Chat demo and some minor fixes