Fix warnings and other misc. minor changes