Created a interface and implemented this to aid in unit testing.