Update for Beta6.
Swift no longer allows the generic enum trick so created separate enums.
Fixed some other changes to how pointers are initialized.