move the class/c implementation into its own file