some optimizations for ctrlp, environment methods added