cleanup. and env hook setup