Optimizations and disable some debug