Dynamic loading of API 

Finished dynamic loading and added callback support.