Tutorial for USB communication with a PIC18F4550 using CDC framework
I have no experience with the CDC but I have some with the MSD class. Some steps I did and may be useful for you. First, let's create a stand alone project:

1) I assume you have downloaded and installed the MAL (Microchip Application Libraries). Copy to your example directory the following files: usb.h, usb_ch9.h, usb_common.h, usb_config.h, usb_device.h, usb_device_local.h, usb_hal.h, USB PIC18.h, usb_function_cdc.h, usb_function_cdc.c and add them to the MPLAB X project. Remove the libraries from the MPLAB project.

2) Compile it, link it, and see if it's still working ok.

3) Using MPLAB X, remove all the code lines that are grayed in the #ifdef or #else preprocessor blocks. That is, remove all the code intended for other architectures that are not intended for a PIC18F45XX.

4) Repeat 2.

5) If you start studying the code now, you'll notice that it's much simpler than what you thought in the beginning, and you will have much more control over you project.

Hope this helps.