Optimized evaluation, needs cleanup.