Replace all init() panics with error returns.