Updated to use the new entity storage system