Efficiency improvements and atomic API