Swift beta 4 adaptation

Lots of changes for beta 4, especially for enums, Int/Uint conversions
and UI tweaks