Cleanup. Optimizations.