Add some more error handling

Test Plan:
- None
Replace lib deps with minified versions

Test Plan:
- Make sure app still loads
Adjust rebuild script to be safer

Test Plan:
- None