cleaning up use of entity framework