chasing -Weffc++ warnings and minor improvements