API: Several improvements to make the api more compatible