more adjustments. refactoring for changes in swift handling of NSData and NSURL objects