Major revamp of how foreign constants/enums are handled.