Welcome in the forum, Marunio!
You only forgot in main() to write
Marunio: You made a few mistakes in your program the main one was the PWM settings in configuration was wrong set incorrectly 2 no names for your signals such as kill_switch and PWM_out. 3) you didn't start the PWM by using this code in the main.c PWM_start(); I am sending you back your program with the fixes in it. Enjoy.