Add generic support to CF build; fixes #327

This PR ports generic support to CF using fixes created by Neil in his Crestron build. Any further problems with this feature should have new issues created so we can work them in priority order.
A bit confusing without the indent. I see why, but I had to look at it twice.