Added some JPA Annotations and database closing when in console (but still gives errors).