Added gitignore.
Update public api calls to be more error tolerant