Reducing costs in production lines