Cleaned up debug info and new api call