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.