Starting refactor to allow passing of data from server to client