Some code adaptations for TerraME standards