Refactored env scripts

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>