Update code to swift 1.1 version