Speed improvements. Cleanup.