cleaned up and made progress on the template