Update code to work with latest version of Swift
 - Change array instantiation
 - Change how for loops run