Fixing samples and handling kernels as instance methods in compiler pipeline