Added support for second API, some issues with that remaining.