Add the ability to fully use the options of the API

Also 
Return proper error definition in case of a bad API call