all optimizations working again and tested. Working on end-to-end tests.