Some optimizations and refactoring to the Light ES. It should be much lighter now for CPU. (Though is still calling for a better implementation.)