build env + some cleanup