refactoring and compatibilized ack-core to doctrine