rename variables to match java standards, add licence headers