Modularizing spark integration.