Switch to API v4; plus additional stuff