Simplify #save code
Refactor #use_api code