cleaning code befor Hibernate