Replacing Library API calls, addresses #286