Splitting server / client code