1. Replace overused asserts in all existing code with error handling