Fixed dependencies and small modification to API