Refactoring Entity persistence stuffs.