Prepare environment