Catch errors
Don't fail if we go over the API limit.
Quick fix
Started cleaning up the code a little.