* removed warnings
 * removed shadow variables
 * safer use of compare for certain compiler versions (optimization related)