Updated so it compiles with the latest and greatest version of Swift.