clean up some js and fixed error handling when Instagram API is broken