Changed some methods to interact with EF