Cleanup and modernization