Cleanup and optimize molecule set