I just changer the kernel inicilization to a method to improve readability.