Entity_Separation and Code_Cleanup

Entities separated into a EJB project. Cleaned code, added comments