Some updated API stuff but still a bit of a mess