Abstractions and ORM

Abstracted some of the functions in the A1V1 script.
Created a php orm object creation function.