Created Template.php

Still needs some sql work and possibly some functionality work