Fix warnings and typos in various places