Re-factored code to remove static methods and properties. Bad for testing.