Moved to Swift 1.0 syntax. Many bugs have been fixed.