added availability controller and fixed stuff
commit conflicts