Client stuff split, but not tested/tweaked yet.