added some bootstrap goodness, and cleaned up template handling a bit more.