some optimization updates
changes to add environment checks into buildpack