Code cleanup
Exception handling for Conditional HTTP checks
Cleanup unused imports