Adding support for API 10
Merging support compatability into last changes