Updated to compile with V1.0 swift.