Cleanup and code splitting