delete option added. Moved some functionality from the controller to the productEntity