Changed Templates to Use Exceptions