cleanup and add build env var