Fixed a bug that didn't take into consideration that the API might not give back all the elements expected
Big cleanup
Big cleanup