Updated to Swift v1.0 syntax/semantics.