Did some cursor work and created optimized cursors