Refactor & failsafe