Converting project to Swift