Refactored Data function into their own module.

Finally some decoupling. There is evidently more code that needs to be refactored, this is for base code refactoring.