Further cleanup in dependencies and code generation
Removed exception code in favor of boolean tests for performance reasons