Added a persistence unit, and did some changes to the core classes. Currently have a nasty problem with dependencies.