refactored chain.swift
updated Swift doodles to Xcode 6 Beta 5