Refactored datalayer and pharmacy manager code to be more concise.

Seperated table creation code from datalayer, the datalayer should be
totally agnostice to what kind of data get loaded in.

Refactored iterator to follow a more standard pattern.
Refactored datalayer and pharmacy manager code to be more concise.

Seperated table creation code from datalayer, the datalayer should be
totally agnostic to what kind of data gets loaded in.

Refactored iterator to follow a more standard pattern.