Some API optimizations