fixed angular chat and some minor cleanup