Added a library handling system to house templates (makes this project more flexible)

Additionally I have adressed:
close #1
close #2

I have done most of what Bryan says but not really that much with error handling.  I took Ananda's suggestions as well and have incorporated them.