Massive refactoring of everything related to availability