Another round of generic code improvements ; hints provided by Netbeans/plugins