Move to masterless setup. Fix many bugs