Refactor of DataAccess.cs