Added CodeFirst base
Added tests.
Added minor catch of fatal exceptions.