Finally got an api structure that works...I think