Major rework of how window functions work internally