Modified annotations, hibernate.cfg.xml and fixed the POS closing
problem