Clean up and add memory requirements.