Repackage as class and change layout to Spark Core recommended library format.