Restore functions that have been disabled

some functions has been disabled/removed cause there are not working
properly with Xcode Beta 5 and the included changes in Swift.