Bringing it up to date with latest GM api changes