Added comments and additional tests and entity data is persisted to a gateway